MuleSoft Accelerator for Retail icon

MuleSoft Accelerator for Retail

(0 reviews)

SAP custom BAPI setup guide - customer profile sync

The following provides guidance on how to use the custom BAPI code (ZBAPI_CUSTOMER) for your SAP instance.

Important: You must complete the following instructions before proceeding to Use case 1 - Customer profile sync from SAP.

BAPI custom objects

You must create the following ABAP objects in order to use this custom BAPI, which are described below.

Data elements:

  • Z_MASTER_ID

Structures

  • ZES_CUSTOMER
  • ZES_CONTROLDATA

Table types:

  • ZTY_CUSTOMER

Transparent tables

  • ZTT_CUSTOMER

Function group:

  • ZFG_CUSTOMER
  • ZFG_CUSTOMER2

Function modules:

  • ZBAPI_CUSTOMER
  • ZBAPI_CUSTOMER_CREATE
  • ZBAPI_CUSTOMER_CUSTOM_FIELDS
  • ZBAPI_CUSTOMER_UPDATE
  • ZBAPI_QUERY
  • ZBAPI_ADDR_QUERY
  • ZBAPI_QUERY_SAP
  • ZBAPI_CUST_QUERY
  • ZBAPI_CUSTOMER_CD

Creating data elements

ObjectHow to create
Z_MASTER_IDsfc-retail-com-bapi_01.png

Creating structures

ObjectHow to create
ZES_CUSTOMERsfc-retail-com-bapi_03.png
ZES_CONTROLDATAsfc-retail-com-bapi_02.png

Creating table types

ObjectHow to create
ZTY_CUSTOMERsfc-retail-com-bapi_05.png

Creating transparent tables

ObjectHow to create
ZTT_CUSTOMERsfc-retail-com-bapi_04.png

Creating function groups and function modules

  1. Create the function group "ZFG_CUSTOMER".

  2. Create the function module "ZBAPI_CUSTOMER", using "Remote-enable module" as processing type:

    sfc-retail-com-bapi_06.png

  3. Complete the import parameters with the following:

    sfc-retail-com-bapi_07.png

  4. Complete the export parameters with the following:

    sfc-retail-com-bapi_08.png

  5. Copy and paste the code from "ZBAPI_CUSTOMER.txt".

  6. Create the function module "ZBAPI_CUSTOMER_CREATE":

    sfc-retail-com-bapi_09.png

  7. Complete the import parameters with the following:

    sfc-retail-com-bapi_10.png

  8. Complete the export parameters with the following:

    sfc-retail-com-bapi_11.png

  9. Copy and paste the code from "ZBAPI_CUSTOMER_CREATE.txt".

  10. Create the function module "ZBAPI_CUSTOMER_CUSTOM_FIELDS":

    sfc-retail-com-bapi_15.png

  11. Complete the import parameters with the following:

    sfc-retail-com-bapi_16.png

  12. Copy and paste the code from "ZBAPI_CUSTOMER_CUSTOM_FIELDS.txt".

  13. Create the function module "ZBAPI_CUSTOMER_UPDATE":

    sfc-retail-com-bapi_12.png

  14. Complete the import parameters with the following:

    sfc-retail-com-bapi_13.png

  15. Complete the export parameters with the following:

    sfc-retail-com-bapi_14.png

  16. Copy and paste the code from "ZBAPI_CUSTOMER_UPDATE.txt".

  17. Create the function module "ZBAPI_QUERY", using "Remote-enable module" as processing type:

    sfc-retail-com-bapi_36.png

  18. Complete the import parameters with the following:

    sfc-retail-com-bapi_18.png

  19. Complete the export parameters with the following:

    sfc-retail-com-bapi_22.png

  20. Copy and paste the code from "ZBAPI_QUERY.txt".

  21. Create the function module "ZBAPI_CONTROL_DATA":

    sfc-retail-com-bapi_21.png

  22. Complete the import parameters with the following:

    sfc-retail-com-bapi_24.png

  23. Complete the export parameters with the following:

    sfc-retail-com-bapi_19.png

  24. Copy the source code from "ZBAPI_CONTROL_DATA.txt".

  25. Activate the entire function group by right-clicking on it in the tree and then selecting "Activate":

    sfc-retail-com-bapi_35.png
  26. Create the function group "ZFG_CUSTOMER2".

  27. Create the function module "ZBAPI_ADDR_QUERY", using "Remote-enable module" as processing type:

    sfc-retail-com-bapi_17.png

  28. Complete the import parameters with the following:

    sfc-retail-com-bapi_20.png

  29. Complete the export parameters with the following:

    sfc-retail-com-bapi_22.png

  30. Copy and paste the code from "ZBAPI_ADDR_QUERY.txt".

  31. Create the function module "ZBAPI_QUERY_SAP" using "Remote-enable module" as processing type:

    sfc-retail-com-bapi_25.png

  32. Complete the import parameters with the following:

    sfc-retail-com-bapi_26.png

  33. Complete the export parameters with the following:

    sfc-retail-com-bapi_27.png

  34. Copy and paste the code from "ZBAPI_QUERY_SAP.txt".

  35. Create the function module "ZBAPI_CUST_QUERY", using "Remote-enable module" as processing type:

    sfc-retail-com-bapi_28.png

  36. Complete the import parameters with the following:

    sfc-retail-com-bapi_29.png

  37. Complete the export parameters with the following:

    sfc-retail-com-bapi_30.png

  38. Copy and paste the code from "ZBAPI_CUST_QUERY.txt".

  39. Create the function module "ZBAPI_CUSTOMER_CD" using "Remote-enable module" as processing type:

    sfc-retail-com-bapi_31.png

  40. Complete the import parameters with the following:

    sfc-retail-com-bapi_32.png

  41. Complete the export parameters with the following:

    sfc-retail-com-bapi_33.png

  42. Copy and paste the code from "ZBAPI_CUSTOMER_CD.txt".

  43. Activate the entire function group by right-clicking on it in the tree and then selecting "Activate":

    sfc-retail-com-bapi_34.png

Reviews

TypeCustom
OrganizationMulesoft Inc.
Published by
MuleSoft Solutions
Published onJul 20, 2021
Contact nameMuleSoft Solutions
Contact emailsolutions-questions@mulesoft.com
Asset overview

Asset versions for 2.1.x

Asset versions
VersionActions
2.1.0